package cj.web.portal.dao;

import java.util.List;
import java.util.Map;

import net.paoding.rose.jade.annotation.DAO;
import net.paoding.rose.jade.annotation.SQL;

/**
 * 
 * @author HanMin
 *
 * 2015年12月29日
 */
@DAO
public interface LineDAO {

	//列表
	@SQL("SELECT id,title,category,abstractInfor,carouselImage,releaseAT FROM Contant WHERE deleteFlag=1 #if(:1!=''){AND category = :1 } ORDER BY stickAT DESC,updateAT DESC LIMIT :2,:3 ")
    List<Map> query(String category,int start,int length);
	
	//列表size
	@SQL("SELECT count(1) FROM Contant WHERE deleteFlag=1 #if(:1!=''){AND category = :1 } ORDER BY stickAT DESC,updateAT DESC ")
    int queryCount(String category);
	
	//详情
	@SQL("SELECT id,title,category,abstractInfor,carouselImage,content,author,releaseState,releaseAT,orderNo,source,qrCode,stickAT FROM Contant WHERE deleteFlag=1 AND id = :1 ")
    List<Map> queryById(String id);
}
